package ok;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ErrorsFrame extends JFrame {

    private JPanel contentPane;
    public JTextArea textArea;
    /**
     * Launch the application.
     */

    /**
     * Create the frame.
     */
    public ErrorsFrame() {
        setTitle("\u603B\u7ED3");
        setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        setBounds(100, 100, 759, 473);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

        setContentPane(contentPane);
        contentPane.setLayout(null);

        JLabel lblNewLabel = new JLabel("\u8FD9\u662F\u60A8\u505A\u9519\u7684\u9898\u76EE\uFF1A");
        lblNewLabel.setFont(new Font("宋体", Font.BOLD, 22));
        lblNewLabel.setBounds(10, 10, 229, 31);
        contentPane.add(lblNewLabel);

        JScrollPane scrollPane = new JScrollPane();
        scrollPane.setBounds(10, 74, 725, 352);
        contentPane.add(scrollPane);

        textArea = new JTextArea();
        textArea.setFont(new Font("Monospaced", Font.BOLD, 20));
        scrollPane.setViewportView(textArea);

        JButton btnNewButton = new JButton("取消");
        btnNewButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
        btnNewButton.setBounds(586, 10, 107, 31);
        contentPane.add(btnNewButton);

        JButton btnNewButton_1 = new JButton("重做");
        btnNewButton_1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                HistoryQuizSystem.errorsFrame.setVisible(false);
                new HistoryQuizSystem().setVisible(true);
            }
        });
        btnNewButton_1.setBounds(424, 10, 107, 31);
        contentPane.add(btnNewButton_1);
    }
}